import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '订单号',
    align:"center",
    dataIndex: 'orderNo'
   },
   {
    title: '订单类型',
    align:"center",
    dataIndex: 'type_dictText'
   },
   {
    title: '订单状态',
    align:"center",
    dataIndex: 'status_dictText'
   },
   {
    title: '支付时间',
    align:"center",
    dataIndex: 'payTime'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '订单号',
    field: 'orderNo',
    component: 'Input',
  },
  {
    label: '教师信息',
    field: 'teacherId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"bee_teacher_base,name,id"
     },
  },
  {
    label: '分站信息',
    field: 'branchId',
    component: 'Input',
  },
  {
    label: '订单类型',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"bee_order_type"
     },
  },
  {
    label: '订单状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"bee_order_status"
     },
  },
  {
    label: '支付状态',
    field: 'payStatus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"bee_pay_status"
     },
  },
  {
    label: '支付时间',
    field: 'payTime',
    component: 'DatePicker',
    componentProps: {
       showTime: true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: '初始报价',
    field: 'reportAmount',
    component: 'InputNumber',
  },
  {
    label: '积分折扣金额',
    field: 'pointDiscount',
    component: 'InputNumber',
  },
  {
    label: '使用点数',
    field: 'usePoint',
    component: 'InputNumber',
  },
  {
    label: '其他折扣',
    field: 'otherDiscount',
    component: 'InputNumber',
  },
  {
    label: '真实价格',
    field: 'realAmount',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}